package com.reader.cms.entity.sys;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.reader.core.validator.group.AddGroup;
import com.reader.core.validator.group.UpdateGroup;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;


/**
*
* @@description 
* @author        jiahaikun
* @date          2018-08-06
*/
@TableName("sys_comm_master")
public class SysCommMaster extends Model<SysCommMaster> {

private static final long serialVersionUID = 1L;



@TableId(value="id", type= IdType.AUTO)


private Integer id;

/**
* 公共代码大类别
*/
@NotBlank(message="共代码编码不能为空！！！", groups = {AddGroup.class, UpdateGroup.class})
@Size(max = 20,message = "公共代码编码长度不能超过20！！！", groups = {AddGroup.class, UpdateGroup.class})
@TableField("master_key")
private String masterKey;

/**
* 公共代码大类名称
*/


@NotBlank(message="公共代码名称不能为空！！！", groups = {AddGroup.class, UpdateGroup.class})
@Size(max = 20,message = "公共代码名称长度不能超过20！！！", groups = {AddGroup.class, UpdateGroup.class})
private String name;

/**
* 禁用：N ,可用:Y
*/


private Integer enable;

/**
* 默认值N，删除为 Y
*/

@TableField("del_flag")
private Integer delFlag;



@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
@TableField("insert_dt")
private Date insertDt;

@TableField("insert_user_id")
private Integer insertUserId;



@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
@TableField("updt_dt")
private Date updtDt;


@TableField("updt_user_id")
private Integer updtUserId;



private String remark;


public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public String getMasterKey() {
return masterKey;
}

public void setMasterKey(String masterKey) {
this.masterKey = masterKey;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public Integer  getEnable() {
return enable;
}

public void setEnable(Integer enable) {
this.enable = enable;
}

public Integer getDelFlag() {
return delFlag;
}

public void setDelFlag(Integer delFlag) {
this.delFlag = delFlag;
}

public Date getInsertDt() {
return insertDt;
}

public void setInsertDt(Date insertDt) {
this.insertDt = insertDt;
}

public Integer getInsertUserId() {
return insertUserId;
}

public void setInsertUserId(Integer insertUserId) {
this.insertUserId = insertUserId;
}

public Date getUpdtDt() {
return updtDt;
}

public void setUpdtDt(Date updtDt) {
this.updtDt = updtDt;
}

public Integer getUpdtUserId() {
return updtUserId;
}

public void setUpdtUserId(Integer updtUserId) {
this.updtUserId = updtUserId;
}

public String getRemark() {
return remark;
}

public void setRemark(String remark) {
this.remark = remark;
}

@Override
protected Serializable pkVal() {
return this.id;
}

@Override
public String toString() {
return "SysCommMaster{" +
	", id=" + id +
	", masterKey=" + masterKey +
	", name=" + name +
	", enable=" + enable +
	", delFlag=" + delFlag +
	", insertDt=" + insertDt +
	", insertUserId=" + insertUserId +
	", updtDt=" + updtDt +
	", updtUserId=" + updtUserId +
	", remark=" + remark +
"}";
}
}